import Vue from 'vue';
import store from '@/store/';
import App from './App.vue';
import router from './router';
import Viewer from 'v-viewer';

import 'viewerjs/dist/viewer.css'; // 引入css

import '@/assets/Css/index.css';
import '@/assets/Css/index.less';
import 'ant-design-vue/dist/antd.css';
import 'swiper/css/swiper.min.css';

import '@/core/lazy_use';
import { removeHTMLTags } from '@/utils/common';
import '@/permission';

// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';

import VueKeepRatio from 'vue-keep-ratio';

import VuePictureVerify from '@/assets/vue-picture-verify';

Vue.use(VuePictureVerify);

Vue.prototype.$bus = new Vue();
// Vue.use(ElementUI);
Vue.use(VueKeepRatio);
Vue.use(Viewer);
Viewer.setDefaults({
  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
});

Vue.filter('hotFilter', function(value) {
  if (Number(value) < 10000) {
    return value;
  } else {
    return (value / 10000).toFixed(2) + '万';
  }
});

Vue.filter('htmlFilter', function(value) {
  if (value) {
    return removeHTMLTags(value);
  } else {
    return '';
  }
});

// require('./mock');

// require('core-js');
// require('regenerator-runtime/runtime');

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app');
